package com.zxy.ziems.server.mybatis.core.pojo;

/**
 * @author chdzq
 * @create 2022/11/11
 */

import com.zxy.ziems.server.mybatis.core.enums.SortEnum;

import java.io.Serializable;

public class SortField implements Serializable {

    /**
     * 字段
     */
    private String field;
    /**
     * 顺序
     */
    private SortEnum order;

    // 空构造方法，解决反序列化
    public SortField() {
    }

    public SortField(String field, SortEnum order) {
        this.field = field;
        this.order = order;
    }

    public String getField() {
        return field;
    }

    public SortField setField(String field) {
        this.field = field;
        return this;
    }

    public SortEnum getOrder() {
        return order;
    }

    public SortField setOrder(SortEnum order) {
        this.order = order;
        return this;
    }

    public boolean isAsc () {
        return SortEnum.ASC.equals(order);
    }
}
